﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>详细网址</title>
    <script src="js/jquery-1.4.1.min.js" type="text/javascript"></script>
</head>
<body style='background-image: url(baidu011.jpg);'>
    <div style="margin-top: 5px ;margin-left: 26px; color:White;">

        <div id="content">
        </div>
    </div>
</body>
<style>
a:visited {
    color: #00ffff;
    font-weight: bold;
    text-decoration: none;
}
a:link {
    color: #ffffff;
    text-decoration: none;
}
user agent stylesheet
a:-webkit-any-link {
    color: -webkit-link;
    cursor: pointer;
    text-decoration: underline;
}
</style>
<script language="javascript" type="text/javascript">



    //写文件
    function writeFile(filename, filecontent) {
        var fso, f, s;
        fso = new ActiveXObject("Scripting.FileSystemObject");
        f = fso.OpenTextFile(filename, 8, true);
        f.WriteLine(filecontent);
        f.Close();
        alert('ok');
    }
    function doSave(value, name) {
        var blob;
        if (typeof window.Blob == "function") {
            blob = new Blob([value], { type: "text" });
        } else {
            var BlobBuilder = window.BlobBuilder || window.MozBlobBuilder || window.WebKitBlobBuilder || window.MSBlobBuilder;
            var bb = new BlobBuilder();
            bb.append(value);
            blob = bb.getBlob(type);
        }
        var URL = window.URL || window.webkitURL;
        var bloburl = URL.createObjectURL(blob);
        navigator.msSaveBlob(blob, name);

//        var anchor = document.createElement("a");
//        if ('download' in anchor) {
//            anchor.style.visibility = "hidden";
//            anchor.href = bloburl;
//            anchor.download = name;
//            document.body.appendChild(anchor);
//            var evt = document.createEvent("MouseEvents");
//            evt.initEvent("click", true, true);
//            anchor.dispatchEvent(evt);
//            document.body.removeChild(anchor);
//        } else if (navigator.msSaveBlob) {
//           
//        } else {
//            location.href = bloburl;
//        }
    }

    $(function () {
        var htmlobj = $.ajax({ url: "file.txt", async: false });

        var v = htmlobj.responseText;
        var arrs = v.split("\r\n");
        for (var i = 0; i < arrs.length; i++) {
            if (arrs[i].indexOf('-') == -1) {
                $("#content").append("<div style='    clear: both; border-bottom: 1px solid #666633;  margin-bottom: 5px; padding-top: 5px;'>");
                $("#content").append("<span style='line-height: 30px; font-size: 18px; padding-left: 15px; '><b style=' font-weight: bold;'>" + arrs[i] + "</b></span>")
            } else {
                $("#content").append("<span style='line-height: 30px; padding-left: 22px;  word-wrap: break-word; word-break: normal;'><nobr style='white-space: nowrap;'><a href='" + arrs[i].split('-')[1] + "' >" + arrs[i].split('-')[0] + "</a><a><img src='112.png'  align='absmiddle' border='0' width='22px'/></a>");

                $("#content").append(" </nobr></span>")
            }
        }

    })
</script>
</html>
